const deviceUpkeep = {
  list: [
    {
      title: '序号',
      dataIndex: 'num',
      key: 'num',
      render: (text, record, index) => {
        return <span>{index + 1}</span>
      }
    },
    {
      title: '计划名称',
      dataIndex: 'maintainName',
      key: 'maintainName',
      render: (text) => (
        <>
          <div>{ text.substring(0,10)}</div>
          <div>{ text.substring(10)}</div>
        </>
      )
    },
    {
      title: '保养类型',
      dataIndex: 'typeName',
      key: 'typeName',
    },
    {
      title: '保养级别',
      dataIndex: 'levelName',
      key: 'levelName',
    },
    {
      title: '设备名称',
      dataIndex: 'deviceName',
      key: 'deviceName',
      render: (text) => (
        <>
          <div>{ text.substring(0,10)}</div>
          <div>{ text.substring(10)}</div>
        </>
      )
    },
    {
      title: '设备使用部门',
      dataIndex: 'groupName',
      key: 'groupName',
    },
    {
      title: '保养员',
      dataIndex: 'maintainUserName',
      key: 'maintainUserName',
    },
    {
      title: '最近执行时间',
      dataIndex: 'recentTaskCaseActionTime',
      key: 'recentTaskCaseActionTime',
      render: (text) => {
        return <span>{text || '--'}</span>
      }
    },
    {
      title: '保养项目',
      dataIndex: 'maintainTaskCount',
      key: 'maintainTaskCount',
      render: () => (
        <></>
      )
    },
    {
      title: '计划状态',
      dataIndex: 'statusName',
      key: 'statusName',
    },
    {
      title: '操作',
      dataIndex: '',
      key: 'x',
      align: 'right',
      render: () => (
        <></>
      ),
    },
  ],
  projectColumns: [
    {
      title: '项目名称',
      dataIndex: 'taskName',
      key: 'taskName',
    },
    {
      title: '项目周期',
      dataIndex: 'cycleTime',
      key: 'cycleTime',
      render: (t) => t ? t : '--',
    },
    {
      title: '项目最近执行时间',
      dataIndex: 'recentTaskCaseActionTime',
      key: 'recentTaskCaseActionTime',
      render: (t) => t ? t : '--',
    },
    {
      title: '最近执行状态',
      dataIndex: 'recentTaskCaseStatusName',
      key: 'recentTaskCaseStatusName',
      render: (t) => t ? t : '--',
    }
  ],
  projectList: [
    {
      title: '序号',
      dataIndex: 'serialNumber',
      key: 'serialNumber',
      width: '10%',
      render: (text, record, index) => {
        return <span>{index + 1}</span>
      }
    },
    {
      title: '任务执行时间',
      dataIndex: 'startTime',
      key: 'startTime',
      width: '25%',
      render: (text) => (
        text ?
          <span>{text + ' 00:00:00—23:59:59'}</span>
          : 
          <span>—</span>
      )
    },
    {
      title: '任务执行状态',
      dataIndex: 'statusName',
      key: 'statusName',
      width: '15%'
    },
    {
      title: '执行结果',
      dataIndex: 'resultName',
      key: 'resultName',
      width: '25%',
      render: () => { }
    },
    {
      title: '操作',
      dataIndex: '',
      key: 'x',
      width: '25%',
      align: 'right',
      render: () => { },
    },
  ]
}

export default deviceUpkeep
